package com.example.test003.service.impl;

import com.example.test003.mapper.ProblemMapper;
import com.example.test003.pojo.Problem;
import com.example.test003.service.ProblemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class ProblemServiceImpl implements ProblemService {

    @Autowired
    private ProblemMapper problemMapper;

    @Override
    public List<Problem> getProblems() {
        List<Problem> problems = problemMapper.getProblems();
        return problems;
    }

    @Override
    public int submitProblem(String content, int status, String time) {
        int i = problemMapper.submitProblem(content, status, time);
        return i;
    }


}
